﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BonsaiScrum.Core.Domain
{
    class TaskBuilder
    {
        private readonly Action<Task> _afterBuildAction;
        private string _description;
        private Priority _priority;

        public TaskBuilder(string description, Priority priority, Action<Task> afterBuildAction)
        {
            _description = description;
            _priority = priority;
            _afterBuildAction = afterBuildAction;
        }

        public void ForStory(int storyId)
        {
            Task task = new Task(_description, _priority, 1);
            _afterBuildAction(task);
        }
    }
}
